{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 预备知识\n",
    "\n",
    "### 1. 转置矩阵（Transpose Matrix）\n",
    "\n",
    "对矩阵\n",
    "$$\n",
    "A = \\begin{pmatrix}\n",
    "a_1 \\\\ a_2 \\\\ ... \\\\ a_n\n",
    "\\end{pmatrix}\n",
    "$$，其中 $a_i$ 为行向量，它的转置矩阵 $A^T$ 定义为\n",
    "$$\n",
    "\\begin{pmatrix}\n",
    "a_1 & a_2 & ... & a_n\n",
    "\\end{pmatrix}\n",
    "$$\n",
    "$A$ 的第 i 行，即为 $A^T$ 的第 i 列。\n",
    "\n",
    "直观上就是把矩阵按从 $a_{ii}$开始的$45°$线（对方阵而言就是对角线）反转。\n",
    "![Matrix_transpose](Matrix_transpose.gif)\n",
    "\n",
    "### 2. 对称矩阵（Symmetric Matrix）\n",
    "\n",
    "若矩阵 $A$ 满足 $A^T=A$，可知该矩阵一定是方阵，而且它关于对角线对称。称这种方阵为对称矩阵。\n",
    "\n",
    "对任意矩阵 $R$，$R^TR$ 一定是对称矩阵。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 一、置换矩阵（Permutation Matrix）\n",
    "\n",
    "在做LU分解过程中，如果主元位置不幸变成了零，我们就需要通过**行交换**来将该行往下移，使主元不为零。\n",
    "\n",
    "行交换对应的变换矩阵叫**置换矩阵**（Permutation Matrix，也可翻译成交换矩阵），一般用 $P$ 表示。对单位矩阵 $I$ 做同样的行交换，就得到该变换对应的置换矩阵 $P$。\n",
    "\n",
    "如果LU分解需要用到行交换，若仍然分解成 $A=LU$，观察初等交换矩阵可知，矩阵 $L$ 将不再是下三角形式。我们把行交换操作单独写成一个置换矩阵，这样 $L$ 就不受其影响，得到 $PA=LU$，$P$ 对应了LU分解过程中所有的行变换。\n",
    "\n",
    "### 性质\n",
    "\n",
    "1. $P^TP=I$\n",
    "2. $P^{-1}=P^T$（由性质一可得）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 1.0.1",
   "language": "julia",
   "name": "julia-1.0"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "1.0.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
